package com.IT.service.Impl;

import com.IT.dao.Impl.UserDaoImpl;
import com.IT.dao.UserDao;
import com.IT.entity.User;
import com.IT.service.UserService;

public class UserServiceImpl implements UserService {
    private UserDao userDao = new UserDaoImpl();

    @Override
    public int login(long account, String password) {
        int authority = userDao.login(account, password);

        return authority;
    }

    @Override
    public int register(long account, String password, String realName, char sex,
                         long telephone, int authority, String createDate, String onDuty) {

        int userAuthority = userDao.register(account, password, realName, sex, telephone, authority,
                createDate, onDuty);

        return userAuthority;
    }

    @Override
    public int insertLog(long account, String content, String ip, String loginTime) {
        int status = userDao.insertLog(account, content, ip, loginTime);

        return status;
    }
}
